package com.dongge.action;

import com.opensymphony.xwork2.ActionSupport;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import java.io.FileInputStream;
import java.io.InputStream;

/**
 * Created by Administrator on 2015/10/3.
 */
@Controller
@Scope("prototype")
public class DownloadAction extends ActionSupport {

    private InputStream inputStream = null;

    public InputStream getInputStream() {
        return inputStream;
    }


    @Override
    public String execute() throws Exception {
        inputStream = new FileInputStream("D:/a/1.txt");
        return SUCCESS;
    }
}
